package com.tanhua.sso.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("users")
public class MyCenterController {

    @Autowired
    private UserInfoController userInfoController;

    /**
     * 更新用户头像
     * @param multipartFile
     * @return
     */
    @PostMapping("header")
    public ResponseEntity<Object> updateLogo(@RequestParam("headPhoto") MultipartFile multipartFile,@RequestHeader("Authorization") String token) {
        return userInfoController.saveUserLogo(multipartFile,token);
    }
}
